<!doctype html>
<html class="no-js">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>党建网</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../assets/css/amazeui.css" />
    <link rel="stylesheet" href="../../assets/css/admin.css">
    <link rel="stylesheet" href="../../css/index.css">
    <link rel="stylesheet" href="../../css/parVideo.css">
  <link rel="stylesheet" href="../../css/prevpagination.css">


</head>

<body>
    <!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
  以获得更好的体验！</p>
<![endif]-->

    <div class="content">

        <!--nav-div-->
        <div id="nav-bar" class="nav-bar"></div>
        <!--nav-div-->

        <div id="img-div"></div>

        <!--left-->
        <div id="left-div" class="left-div"></div>
        <!--left-->

        <!--content-->
        <div class="content-div">
            <div class="con-header">党员风采</div>
            <div class="con-dis">
                <ul data-am-widget="gallery" class="am-gallery am-avg-sm-3
  am-avg-md-3 am-avg-lg-3 am-gallery-bordered" data-am-gallery="{  }" id="img1">
      
  </ul>
<!--   <ul data-am-widget="gallery" class="am-gallery am-avg-sm-3
  am-avg-md-3 am-avg-lg-3 am-gallery-bordered" data-am-gallery="{  }" id="img2">
      
  </ul> -->
  <div id="page_div">
						<div class="M-box3" style="float:right"></div>
					</div>
            </div>

        </div>

        <!--content-->


        <!--right-->
        <div id="right-div" class="right-div"></div>
        <!--right-->
    </div>
    <!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="/assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->

    <!--[if (gte IE 9)|!(IE)]><!-->
    <script src="../../assets/js/jquery.min.js"></script>
    <!--<![endif]-->
    <script src="../../assets/js/amazeui.min.js"></script>
    <script src="../../js/prevHeader.js"></script>
    <script src="../../js/jquery.zlight.menu.1.0.min.js"></script>
<script src="../../js/index.js"></script>
<script src="../../js/global.js"></script>
<script src="../../js/jquery.pagination.js"></script>
<script src="../../js/parMem.js"></script>
    <script>
        $(document).ready(function(){
           $("#location").text("当前位置：首页 > 党员风采 ");
           
           $.ajax({
   			type : "GET",
   			url : "/partyBuilding/partyMem/curPage/1/pageSize/12",
   			contentType : "application/json",
   			dataType : "json",
   			success : function(data) {
   				//alert(JSON.stringify(data));
   				
   				if(data.code == "200") {
   					img(data);
   					$("#location").text("当前位置：首页  > 党员风采");
   				  var pag = data.pageInfo.totalCount; //信息列表总记录数目
 					pagination(pag, 1);
 					PageBtn();
   				}
   			},
   			error : function() {
   				
   			}
   		});  
        })
        
        function img(data){
        	$("#img1").html("");
        	$.each(data.partyMems, function(num, partyMems) {

        		$("#img1").append('<li><div style="height:190px" class="am-gallery-item">'+
                        '<a href="#" pkPartyMem="'+partyMems.pkPm+'"onclick="info(this)"><img style="height:150px" src="'+partyMems.pmPhotoUrl+'"  alt="照片"/>'+
                        '<h3 class="am-gallery-title">'+partyMems.pmName+'</h3></a>'+
                        '</div></li>');
                        
                
            })
            
        }
       
        var totalPage = 0; //总页数
     	function pagination(pag, cur) {

     		var page = 1; //页数
     		page = parseInt(pag / 18);
     		var pageSize = (pag % 18);
     		if (pageSize == 0) {
     			totalPage = page;
     		} else {
     			totalPage = page + 1;
     		}

     		$('.M-box3').pagination({
     			pageCount : totalPage,
     			current : cur,
     			jump : true,
     			coping : true,
     			homePage : '首页',
     			endPage : '末页',
     			prevContent : '上页',
     			nextContent : '下页'
     		});

     	}
    </script>

</body>

</html>